Repository navigation
Harden integration data updater against CI-red PRs - #2229
Open
David Pine (IEvangelist) wants to merge 1 commit into
Open
David Pine (IEvangelist) wants to merge 1 commit into
David Pine (IEvangelist) wants to merge 1 commit into
Conversation
- Resolve inherited ATS capabilities projected onto derived handles (e.g. BaseKubernetesResource.Metadata) as a fallback tier. - Move known TypeScript export gaps into the test; drop hand-added entries from the updater-owned api-generation-failures.json. - Make the standalone-dashboard sample pin check version-agnostic. - Count untracked generated files in the PR body area table. - Run test:unit in the updater; on failure, list failures and withhold the auto-merge label; abort if tests rewrite generated data. - Generate twoslash types to a temp file in tests instead of the tracked aspire.d.ts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The updater can mistake a generic test-failure heading for bot-owned label removal and re-add a label on the next passing run, overriding a maintainer’s manual hold.
1 open issue
What changed in this PR
This PR hardens aspire.dev’s integration-data updater against validation gaps exposed by #2212, aligning its checks more closely with CI.
Changes:
- Runs unit tests before publication, controls auto-merge labeling, detects test-induced data changes, and corrects generated-file counts.
- Resolves inherited TypeScript API members and separates known export gaps from generator failures.
- Makes dashboard image checks version-independent and isolates twoslash test output.
| File | Description |
|---|---|
src/frontend/tests/unit/twoslash-types-generator.vitest.test.ts |
Generates declarations in a temporary directory with cleanup. |
src/frontend/tests/unit/integration-data-updater.vitest.test.ts |
Covers test failures, data mutations, and added-file counts. |
src/frontend/tests/unit/dashboard-image-references.vitest.test.ts |
Accepts consistent upstream major.minor image pins. |
src/frontend/tests/unit/api-reference.vitest.test.ts |
Records known missing TypeScript exports in a dedicated allowlist. |
src/frontend/src/utils/api-reference/typescript-provider.ts |
Adds inherited-member resolution as a fallback. |
src/frontend/src/utils/api-reference-core.ts |
Adds base-type hierarchy metadata to TypeScript handles. |
src/frontend/src/data/api-generation-failures.json |
Removes two manually maintained export-gap entries. |
src/frontend/scripts/update-integration-data.ps1 |
Adds unit-test gating, mutation checks, and accurate file counts. |
.github/workflows/update-integration-data.yml |
Uses test results to manage auto-merge labels and report status. |
Review effort: Balanced
Comment on lines
+189
to
+190
| elif [ "$AUTO_MERGE" = "true" ] && [ "$has_label" != "true" ] && | ||
| grep -qF -- "$failure_marker" <<< "$previous_body"; then |
Contributor
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
#2212 failed
Frontend validationeven though #2049 closed with "All packages passed API generation". API generation was fine; the failures came from gaps between the updater and CI.Root causes and fixes
Declared export …entries toapi-generation-failures.json. The updater rewrites that file from real generator failures, so it dropped them and the declared-export test failed. Those entries also turned off stale-version checks for both packages.BaseKubernetesResource.Metadatawas a resolver bug. ATS projects inherited members onto each derived handle (PersistentVolumeClaim.metadata,KubernetesManifestResource.metadata), but the resolver ignoredbaseTypeHierarchy. I added a base-hierarchy match that runs only when nothing matches the type directly, so base-type references that resolve today don't become ambiguous.AzureApiManagementResource.Identityis a real upstream gap: it's marked[AspireExport], but ATS doesn't emit it. It now sits in an allowlist inside the test, next to the existing Radius exception.validate:api-datadoesn't run the data-dependent unit tests. The updater now runsbun run test:unit. If tests fail, it still opens or refreshes the PR but leaves off the:octocat: auto-mergelabel and lists the failing tests in the body. On a later passing run, it puts the label back only if the bot removed it, so a maintainer's hold stays.nightly/dashboard:13.6, butsamples.jsonis synced from upstream, which now uses17.0. The test now accepts any consistentmajor.minorpin.Get-AreaCountsusedgit diff HEAD, which skips untracked generated files. chore: Update integration data and GitHub stats (11/20/26) #2212 reported "0 added, 69 removed" when those were version bumps.twoslash-types-generatorregenerated the trackedaspire.d.tsin place. It now writes to a temp file. The updater also aborts iftest:unitchanges any file in the paths it stages.The next updater run rebases #2212 onto
mainand picks these up.Third-party links and affiliations
None
Validation
vitest run tests/unit/api-reference.vitest.test.ts tests/unit/dashboard-image-references.vitest.test.ts tests/unit/integration-data-updater.vitest.test.ts tests/unit/twoslash-types-generator.vitest.test.ts: passed (107 tests) onmaindata.chore/update-integration-data): passed (81 tests). CI failed on that data before this change.bun run lint: passed.vitest run: 1558 passed, 1 failed (incremental-build,spawn bun ENOENT). It fails the same way on unmodifiedmainon this Windows machine, so it's a local environment issue.